﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(Transform))]
public class TransformEditorExtend : Editor
{

    public override void OnInspectorGUI()
    {
        
        //base.OnInspectorGUI();
        Transform trans = (target as Transform);
        
        trans.localPosition = EditorGUILayout.Vector3Field("局部坐标", trans.localPosition);
        trans.position =  EditorGUILayout.Vector3Field("世界坐标", trans.position);
        trans.eulerAngles = EditorGUILayout.Vector3Field("欧拉角", trans.eulerAngles);
        trans.localScale = EditorGUILayout.Vector3Field("缩放", trans.localScale);
        Undo.RecordObject(trans, trans.ToString());





    }
}
